#ifndef PROTOCOL_H_
#define PROTOCOL_H_

/*
 * A class that implements constants that serve as a Protocol dictionary for network communication and send/receive routines
 */

#include <string>
#include <iostream>

using namespace std;

class Protocol{

public:

	//DATA MEMBERS

	static const string START_SESSION_MSG;
	static const string END_SESSION_MSG;
	static const string TWIT_MSG;
	static const string DIRECT_MESSAGE_MSG;
	static const string PA_MESSAGE_MSG;
	static const string FOLLOW_MSG;
	static const string UNFOLLOW_MSG;
	static const string CONNECT_MSG;
	static const string DISCONNECT_MSG;
	static const string WHO_MSG;
	static const string ACK_MSG;
	static const string ERROR_MSG;
	static const string END_LINE_MSG;
	static const string WELCOME_MSG;
	static const string HELLO_MSG;
	static const string BYE_BYE_MSG;
	static const string END_OF_LIST_MSG;

	static const string MSG_SEPARATOR;

	//FUNCTIONS

	//The function sends input Data to socketFD
	//The functions returns the number of Bytes sent or -1 upon an error
	static int sendMessage(int socketFD,void* inputData, int size);

	//The function reads a message from socketFD and allocates and assigns the data to outputData
	//Freeing the space allocated is the caller's responsibility
	//The Function returns the size in Bytes of received data or -1 upon an error
	static int readMessage(int socketFD,void*& outputData);


};


#endif /* PROTOCOL_H_ */
